package com.usian.user.feign;

import com.usian.model.article.pojos.ApAuthor;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("leadnews-article")
public interface ApAuthorFeign {

    @GetMapping("/api/v1/author/findByUserId")
    public ApAuthor findByUserId(@RequestParam Integer id);

    @PostMapping("/api/v1/author/add")
    public ResponseResult add(@RequestBody ApAuthor apAuthor);

    @GetMapping("/api/v1/author/one/{id}")
    public ApAuthor findById(@PathVariable Integer id);
}
